﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;

namespace Loggan.Configurations
{
    class LogganConfigurationSection : ConfigurationSection
    {
        #region Constructors
        static LogganConfigurationSection()
        {
            propConfigs = new ConfigurationProperty(
                "",
                typeof(ConfigsElementCollection),
                null,
                ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsDefaultCollection
                );

            properties = new ConfigurationPropertyCollection();

            properties.Add(propConfigs);
        }
        #endregion

        #region Fields
        private static ConfigurationPropertyCollection properties;
        private static ConfigurationProperty propConfigs;
        #endregion

        #region Properties

        public ConfigsElementCollection Configs
        {
            get { return (ConfigsElementCollection)base[propConfigs]; }
        }

        protected override ConfigurationPropertyCollection Properties
        {
            get
            {
                return properties;
            }
        }
        #endregion
    }
}
